{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "import os\n",
    "os.environ['CUDA_VISIBLE_DEVICES'] = ''"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import malaya\n",
    "from malaya.torch_model.t5 import T5Diaparser\n",
    "from transformers import T5Tokenizer, T5Config"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "tokenizer_ = malaya.tokenizer.Tokenizer()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "from transformers import T5Tokenizer\n",
    "\n",
    "tokenizer = T5Tokenizer.from_pretrained('mesolitica/t5-small-standard-bahasa-cased')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['finetune-t5-small-standard-bahasa-cased-v2/checkpoint-2060000',\n",
       " 'finetune-t5-small-standard-bahasa-cased-v2/checkpoint-2070000',\n",
       " 'finetune-t5-small-standard-bahasa-cased-v2/checkpoint-2080000']"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from glob import glob\n",
    "\n",
    "checkpoints = sorted(glob('finetune-t5-small-standard-bahasa-cased-v2/checkpoint-*'))\n",
    "checkpoints"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "# !cp -r finetune-t5-small-standard-bahasa-cased checkpoint"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = T5Diaparser.from_pretrained(checkpoints[-1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "text = 'Dr Mahathir menasihati mereka supaya berhenti berehat dan tidur sebentar sekiranya mengantuk ketika memandu.'\n",
    "text = tokenizer_.tokenize(text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "s = \"\"\"\n",
    "KUALA LUMPUR: Dalam hal politik, jarang sekali untuk melihat dua figura ini - bekas Perdana Menteri, Datuk Seri Najib Razak dan Tun Dr Mahathir Mohamad mempunyai 'pandangan yang sama' atau sekapal. Namun, situasi itu berbeza apabila melibatkan isu ketidakpatuhan terhadap prosedur operasi standard (SOP). Najib, yang juga Ahli Parlimen Pekan memuji sikap Ahli Parlimen Langkawi itu yang mengaku bersalah selepas melanggar SOP kerana tidak mengambil suhu badan ketika masuk ke sebuah surau di Langkawi pada Sabtu lalu.\n",
    "\"\"\"\n",
    "text = tokenizer_.tokenize(s)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "# text = 'saya tak suka ayam dan daging.'\n",
    "# text = tokenizer_.tokenize(text)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "texts, indices = [1], [0]\n",
    "for i in range(len(text)):\n",
    "    t = tokenizer.encode(text[i], add_special_tokens=False)\n",
    "    texts.extend(t)\n",
    "    indices.extend([i + 1] * len(t))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "model_inputs = {\n",
    "    'input_ids': texts,\n",
    "    'attention_mask': [1] * len(texts),\n",
    "    'indices': indices\n",
    "}\n",
    "padded = tokenizer.pad(\n",
    "    [model_inputs],\n",
    "    padding=True,\n",
    "    max_length=None,\n",
    "    pad_to_multiple_of=None,\n",
    "    return_tensors='pt',\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [],
   "source": [
    "padded = tokenizer.pad(\n",
    "    [model_inputs],\n",
    "    padding=True,\n",
    "    max_length=None,\n",
    "    pad_to_multiple_of=None,\n",
    "    return_tensors='pt',\n",
    ")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'input_ids': tensor([[    1,  2147,  2377,    13,    31,   335,  1553,   486,    13,    14,\n",
       "          3842,   793,    25,   244,   192,    13, 14656,    83,    34,    13,\n",
       "             7,   821,  1188,   506,    13,    14,   390,   738,  2562,  3993,\n",
       "            22,  1459,   267,  1334,  1631,   118,    13,    12,  2097,    17,\n",
       "           200,    12,    87,  1210, 17300,    13,     3,   918,    13,    14,\n",
       "          4381,    37,   936,   721,  2077,   665, 11452,   942, 14811,   226,\n",
       "          7162,  1436,  2022,    13,     4,    13, 17098,    13,     5,    13,\n",
       "             3,  2562,    13,    14,    17,    93,  2171,  2174,  9187,  6569,\n",
       "          4876,  2171,  2174, 11619,    37,    17,  3857,  3465,   428,  4253,\n",
       "            13, 17098,   122,    30,   330,  6587,  1294,   123,   605,    55,\n",
       "           136, 19126,    24, 11619,    33,  1686,   186,    13,     3]]), 'attention_mask': tensor([[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,\n",
       "         1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]]), 'indices': tensor([[ 0,  1,  2,  3,  3,  4,  5,  6,  7,  7,  8,  9, 10, 11, 12, 13, 13, 13,\n",
       "         14, 15, 15, 16, 17, 18, 19, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29,\n",
       "         30, 30, 31, 32, 33, 33, 34, 35, 35, 36, 36, 37, 38, 38, 39, 40, 41, 42,\n",
       "         43, 44, 45, 45, 45, 46, 47, 48, 49, 50, 50, 51, 51, 52, 52, 53, 53, 54,\n",
       "         55, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,\n",
       "         72, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88,\n",
       "         88]])}"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "padded"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [],
   "source": [
    "o = model(**padded)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "odict_keys(['logits', 'past_key_values', 'decoder_hidden_states', 'encoder_last_hidden_state', 'encoder_hidden_states', 's_arc', 's_rel'])"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "o.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [],
   "source": [
    "arc_preds = o.s_arc.argmax(axis = -1)\n",
    "rel_preds = o.s_rel.argmax(-1)\n",
    "rel_preds = rel_preds.gather(-1, arc_preds.unsqueeze(-1)).squeeze(-1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "tag2idx = {'PAD': 0,\n",
    " 'X': 1,\n",
    " 'nsubj': 2,\n",
    " 'cop': 3,\n",
    " 'det': 4,\n",
    " 'root': 5,\n",
    " 'nsubj:pass': 6,\n",
    " 'acl': 7,\n",
    " 'case': 8,\n",
    " 'obl': 9,\n",
    " 'flat': 10,\n",
    " 'punct': 11,\n",
    " 'appos': 12,\n",
    " 'amod': 13,\n",
    " 'compound': 14,\n",
    " 'advmod': 15,\n",
    " 'cc': 16,\n",
    " 'obj': 17,\n",
    " 'conj': 18,\n",
    " 'mark': 19,\n",
    " 'advcl': 20,\n",
    " 'nmod': 21,\n",
    " 'nummod': 22,\n",
    " 'dep': 23,\n",
    " 'xcomp': 24,\n",
    " 'ccomp': 25,\n",
    " 'parataxis': 26,\n",
    " 'compound:plur': 27,\n",
    " 'fixed': 28,\n",
    " 'aux': 29,\n",
    " 'csubj': 30,\n",
    " 'iobj': 31,\n",
    " 'csubj:pass': 32}\n",
    "\n",
    "idx2tag = {v: k for k, v in tag2idx.items()}"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [],
   "source": [
    "from malaya_boilerplate.torch_utils import to_tensor_cuda, to_numpy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [],
   "source": [
    "seq = padded['input_ids'][0,1:]\n",
    "seq = tokenizer.convert_ids_to_tokens(seq)\n",
    "tagging = rel_preds[0,1:].detach().numpy()\n",
    "depend = arc_preds[0,1:].detach().numpy()\n",
    "tagging = [idx2tag[i] for i in tagging]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "def merge_sentencepiece_tokens_tagging(x, y, model='bert', rejected=None, **kwargs):\n",
    "    new_paired_tokens = []\n",
    "    n_tokens = len(x)\n",
    "    if rejected is None:\n",
    "        rejected = list(SPECIAL_TOKENS[model].values())\n",
    "\n",
    "    i = 0\n",
    "\n",
    "    while i < n_tokens:\n",
    "\n",
    "        current_token, current_label = x[i], y[i]\n",
    "\n",
    "        if isinstance(current_token, bytes):\n",
    "            current_token = current_token.decode()\n",
    "        if not current_token.startswith('▁') and current_token not in rejected and i > 0:\n",
    "            previous_token, previous_label = new_paired_tokens.pop()\n",
    "            merged_token = previous_token\n",
    "            merged_label = [previous_label]\n",
    "            while (\n",
    "                not current_token.startswith('▁')\n",
    "                and current_token not in rejected\n",
    "            ):\n",
    "                merged_token = merged_token + current_token.replace('▁', '')\n",
    "                merged_label.append(current_label)\n",
    "                i = i + 1\n",
    "                if i < n_tokens:\n",
    "                    current_token, current_label = x[i], y[i]\n",
    "                else:\n",
    "                    break\n",
    "            merged_label = merged_label[0]\n",
    "            new_paired_tokens.append((merged_token, merged_label))\n",
    "\n",
    "        else:\n",
    "            new_paired_tokens.append((current_token, current_label))\n",
    "            i = i + 1\n",
    "\n",
    "    words = [\n",
    "        i[0].replace('▁', '') for i in new_paired_tokens if i[0] not in rejected\n",
    "    ]\n",
    "    labels = [i[1] for i in new_paired_tokens if i[0] not in rejected]\n",
    "    return words, labels\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# merge_sentencepiece_tokens_tagging(seq, tagging, rejected = tokenizer.all_special_tokens)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "scrolled": true
   },
   "outputs": [],
   "source": [
    "# merge_sentencepiece_tokens_tagging(seq, depend, rejected = tokenizer.all_special_tokens)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "from malaya.function.parse_dependency import DependencyGraph"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "tagging = merge_sentencepiece_tokens_tagging(seq, tagging, rejected = tokenizer.all_special_tokens)\n",
    "tagging = list(zip(*tagging))\n",
    "indexing = merge_sentencepiece_tokens_tagging(seq, depend, rejected = tokenizer.all_special_tokens)\n",
    "indexing = list(zip(*indexing))\n",
    "\n",
    "result, indexing_ = [], []\n",
    "for i in range(len(tagging)):\n",
    "    index = int(indexing[i][1])\n",
    "    if index > len(tagging):\n",
    "        index = len(tagging)\n",
    "    elif (i + 1) == index:\n",
    "        index = index + 1\n",
    "    elif index == -1:\n",
    "        index = i\n",
    "    indexing_.append((indexing[i][0], index))\n",
    "    result.append(\n",
    "        '%d\\t%s\\t_\\t_\\t_\\t_\\t%d\\t%s\\t_\\t_'\n",
    "        % (i + 1, tagging[i][0], index, tagging[i][1])\n",
    "    )\n",
    "d = DependencyGraph('\\n'.join(result), top_relation_label='root')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n",
       "<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"\n",
       " \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n",
       "<!-- Generated by graphviz version 2.43.0 (0)\n",
       " -->\n",
       "<!-- Title: G Pages: 1 -->\n",
       "<svg width=\"2422pt\" height=\"827pt\"\n",
       " viewBox=\"0.00 0.00 2421.50 827.00\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<g id=\"graph0\" class=\"graph\" transform=\"scale(1 1) rotate(0) translate(4 823)\">\n",
       "<title>G</title>\n",
       "<polygon fill=\"white\" stroke=\"transparent\" points=\"-4,4 -4,-823 2417.5,-823 2417.5,4 -4,4\"/>\n",
       "<!-- 0 -->\n",
       "<g id=\"node1\" class=\"node\">\n",
       "<title>0</title>\n",
       "<text text-anchor=\"middle\" x=\"187.5\" y=\"-797.3\" font-family=\"Times,serif\" font-size=\"14.00\">0 (None)</text>\n",
       "</g>\n",
       "<!-- 1 -->\n",
       "<g id=\"node2\" class=\"node\">\n",
       "<title>1</title>\n",
       "<text text-anchor=\"middle\" x=\"187.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">1 (KUALA)</text>\n",
       "</g>\n",
       "<!-- 0&#45;&gt;1 -->\n",
       "<g id=\"edge1\" class=\"edge\">\n",
       "<title>0&#45;&gt;1</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M187.5,-782.8C187.5,-771.16 187.5,-755.55 187.5,-742.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"191,-742.18 187.5,-732.18 184,-742.18 191,-742.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"202.5\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">root</text>\n",
       "</g>\n",
       "<!-- 2 -->\n",
       "<g id=\"node3\" class=\"node\">\n",
       "<title>2</title>\n",
       "<text text-anchor=\"middle\" x=\"53.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">2 (LUMPUR)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;2 -->\n",
       "<g id=\"edge2\" class=\"edge\">\n",
       "<title>1&#45;&gt;2</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M157.36,-695.94C147.74,-690.35 137.1,-684.03 127.5,-678 113.85,-669.42 99.08,-659.56 86.35,-650.87\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"88.12,-647.85 77.9,-645.08 84.16,-653.62 88.12,-647.85\"/>\n",
       "<text text-anchor=\"middle\" x=\"139.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 3 -->\n",
       "<g id=\"node4\" class=\"node\">\n",
       "<title>3</title>\n",
       "<text text-anchor=\"middle\" x=\"152.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">3 (:)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;3 -->\n",
       "<g id=\"edge3\" class=\"edge\">\n",
       "<title>1&#45;&gt;3</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M170.65,-695.69C166.37,-690.39 162.21,-684.29 159.5,-678 156.48,-671 154.71,-662.98 153.68,-655.44\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"157.14,-654.88 152.67,-645.27 150.17,-655.57 157.14,-654.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"180\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 5 -->\n",
       "<g id=\"node5\" class=\"node\">\n",
       "<title>5</title>\n",
       "<text text-anchor=\"middle\" x=\"228.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">5 (hal)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;5 -->\n",
       "<g id=\"edge4\" class=\"edge\">\n",
       "<title>1&#45;&gt;5</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M195.8,-695.8C201.52,-683.93 209.24,-667.93 215.74,-654.45\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"219.02,-655.7 220.22,-645.18 212.72,-652.66 219.02,-655.7\"/>\n",
       "<text text-anchor=\"middle\" x=\"230.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">nmod</text>\n",
       "</g>\n",
       "<!-- 11 -->\n",
       "<g id=\"node6\" class=\"node\">\n",
       "<title>11</title>\n",
       "<text text-anchor=\"middle\" x=\"471.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">11 (melihat)</text>\n",
       "</g>\n",
       "<!-- 1&#45;&gt;11 -->\n",
       "<g id=\"edge5\" class=\"edge\">\n",
       "<title>1&#45;&gt;11</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M232.5,-699.53C280.35,-685.21 356.36,-662.46 409.79,-646.47\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"410.91,-649.79 419.49,-643.57 408.9,-643.08 410.91,-649.79\"/>\n",
       "<text text-anchor=\"middle\" x=\"381\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">parataxis</text>\n",
       "</g>\n",
       "<!-- 4 -->\n",
       "<g id=\"node7\" class=\"node\">\n",
       "<title>4</title>\n",
       "<text text-anchor=\"middle\" x=\"75.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">4 (Dalam)</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;4 -->\n",
       "<g id=\"edge6\" class=\"edge\">\n",
       "<title>5&#45;&gt;4</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M197.13,-612.45C194.22,-611.26 191.31,-610.09 188.5,-609 166.09,-600.29 158.49,-602.71 137.5,-591 124.61,-583.8 111.68,-573.91 101,-564.83\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"103.13,-562.04 93.3,-558.09 98.52,-567.31 103.13,-562.04\"/>\n",
       "<text text-anchor=\"middle\" x=\"153.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 6 -->\n",
       "<g id=\"node8\" class=\"node\">\n",
       "<title>6</title>\n",
       "<text text-anchor=\"middle\" x=\"179.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">6 (politik)</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;6 -->\n",
       "<g id=\"edge7\" class=\"edge\">\n",
       "<title>5&#45;&gt;6</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M197.34,-612.02C189.07,-606.69 181.15,-599.74 176.5,-591 172.85,-584.14 172.11,-575.97 172.7,-568.25\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"176.19,-568.56 174.17,-558.16 169.27,-567.55 176.19,-568.56\"/>\n",
       "<text text-anchor=\"middle\" x=\"213.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">compound</text>\n",
       "</g>\n",
       "<!-- 7 -->\n",
       "<g id=\"node9\" class=\"node\">\n",
       "<title>7</title>\n",
       "<text text-anchor=\"middle\" x=\"276.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">7 (,)</text>\n",
       "</g>\n",
       "<!-- 5&#45;&gt;7 -->\n",
       "<g id=\"edge8\" class=\"edge\">\n",
       "<title>5&#45;&gt;7</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M242.53,-608.72C246.66,-603.23 251,-597.02 254.5,-591 258.79,-583.62 262.78,-575.25 266.16,-567.5\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"269.45,-568.71 270.08,-558.13 262.99,-566 269.45,-568.71\"/>\n",
       "<text text-anchor=\"middle\" x=\"283\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 8 -->\n",
       "<g id=\"node10\" class=\"node\">\n",
       "<title>8</title>\n",
       "<text text-anchor=\"middle\" x=\"364.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">8 (jarang)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;8 -->\n",
       "<g id=\"edge10\" class=\"edge\">\n",
       "<title>11&#45;&gt;8</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M437.38,-608.87C428.28,-603.65 418.7,-597.55 410.5,-591 401.42,-583.75 392.52,-574.67 385,-566.25\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"387.44,-563.73 378.25,-558.46 382.15,-568.31 387.44,-563.73\"/>\n",
       "<text text-anchor=\"middle\" x=\"439\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">advmod</text>\n",
       "</g>\n",
       "<!-- 10 -->\n",
       "<g id=\"node12\" class=\"node\">\n",
       "<title>10</title>\n",
       "<text text-anchor=\"middle\" x=\"471.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">10 (untuk)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;10 -->\n",
       "<g id=\"edge11\" class=\"edge\">\n",
       "<title>11&#45;&gt;10</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M471.5,-608.8C471.5,-597.16 471.5,-581.55 471.5,-568.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"475,-568.18 471.5,-558.18 468,-568.18 475,-568.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"487.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 13 -->\n",
       "<g id=\"node13\" class=\"node\">\n",
       "<title>13</title>\n",
       "<text text-anchor=\"middle\" x=\"581.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">13 (figura)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;13 -->\n",
       "<g id=\"edge12\" class=\"edge\">\n",
       "<title>11&#45;&gt;13</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M493.76,-608.8C510.31,-596.01 533.08,-578.42 551.27,-564.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"553.5,-567.06 559.27,-558.18 549.22,-561.52 553.5,-567.06\"/>\n",
       "<text text-anchor=\"middle\" x=\"544.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 29 -->\n",
       "<g id=\"node14\" class=\"node\">\n",
       "<title>29</title>\n",
       "<text text-anchor=\"middle\" x=\"938.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">29 (mempunyai)</text>\n",
       "</g>\n",
       "<!-- 11&#45;&gt;29 -->\n",
       "<g id=\"edge13\" class=\"edge\">\n",
       "<title>11&#45;&gt;29</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M523.71,-616.5C606.01,-601.52 766.32,-572.34 861.74,-554.97\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"862.41,-558.41 871.62,-553.17 861.16,-551.52 862.41,-558.41\"/>\n",
       "<text text-anchor=\"middle\" x=\"767\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">parataxis</text>\n",
       "</g>\n",
       "<!-- 9 -->\n",
       "<g id=\"node11\" class=\"node\">\n",
       "<title>9</title>\n",
       "<text text-anchor=\"middle\" x=\"339.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">9 (sekali)</text>\n",
       "</g>\n",
       "<!-- 8&#45;&gt;9 -->\n",
       "<g id=\"edge9\" class=\"edge\">\n",
       "<title>8&#45;&gt;9</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M359.44,-521.8C355.98,-510.05 351.33,-494.24 347.39,-480.84\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"350.73,-479.78 344.55,-471.18 344.02,-481.76 350.73,-479.78\"/>\n",
       "<text text-anchor=\"middle\" x=\"382\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">advmod</text>\n",
       "</g>\n",
       "<!-- 12 -->\n",
       "<g id=\"node15\" class=\"node\">\n",
       "<title>12</title>\n",
       "<text text-anchor=\"middle\" x=\"436.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">12 (dua)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;12 -->\n",
       "<g id=\"edge14\" class=\"edge\">\n",
       "<title>13&#45;&gt;12</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M535.31,-524.56C514.84,-517.71 493.4,-509.78 484.5,-504 474.04,-497.21 464.18,-487.72 456.15,-478.83\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"458.79,-476.53 449.6,-471.26 453.5,-481.11 458.79,-476.53\"/>\n",
       "<text text-anchor=\"middle\" x=\"516\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">nummod</text>\n",
       "</g>\n",
       "<!-- 14 -->\n",
       "<g id=\"node16\" class=\"node\">\n",
       "<title>14</title>\n",
       "<text text-anchor=\"middle\" x=\"526.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">14 (ini)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;14 -->\n",
       "<g id=\"edge15\" class=\"edge\">\n",
       "<title>13&#45;&gt;14</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M570.37,-521.8C562.54,-509.7 551.93,-493.3 543.11,-479.67\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"545.98,-477.67 537.61,-471.18 540.11,-481.47 545.98,-477.67\"/>\n",
       "<text text-anchor=\"middle\" x=\"569.5\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">det</text>\n",
       "</g>\n",
       "<!-- 15 -->\n",
       "<g id=\"node17\" class=\"node\">\n",
       "<title>15</title>\n",
       "<text text-anchor=\"middle\" x=\"605.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">15 (&#45;)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;15 -->\n",
       "<g id=\"edge16\" class=\"edge\">\n",
       "<title>13&#45;&gt;15</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M586.36,-521.8C589.67,-510.05 594.14,-494.24 597.92,-480.84\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"601.3,-481.75 600.65,-471.18 594.56,-479.85 601.3,-481.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"616\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 16 -->\n",
       "<g id=\"node18\" class=\"node\">\n",
       "<title>16</title>\n",
       "<text text-anchor=\"middle\" x=\"696.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">16 (bekas)</text>\n",
       "</g>\n",
       "<!-- 13&#45;&gt;16 -->\n",
       "<g id=\"edge17\" class=\"edge\">\n",
       "<title>13&#45;&gt;16</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M612.84,-521.93C621.99,-516.54 631.85,-510.33 640.5,-504 651.18,-496.18 662.2,-486.69 671.61,-478.1\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"674.15,-480.51 679.09,-471.14 669.38,-475.38 674.15,-480.51\"/>\n",
       "<text text-anchor=\"middle\" x=\"673.5\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">conj</text>\n",
       "</g>\n",
       "<!-- 31 -->\n",
       "<g id=\"node31\" class=\"node\">\n",
       "<title>31</title>\n",
       "<text text-anchor=\"middle\" x=\"851.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">31 (pandangan)</text>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;31 -->\n",
       "<g id=\"edge30\" class=\"edge\">\n",
       "<title>29&#45;&gt;31</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M920.89,-521.8C908.16,-509.36 890.77,-492.36 876.58,-478.5\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"878.68,-475.66 869.08,-471.18 873.79,-480.67 878.68,-475.66\"/>\n",
       "<text text-anchor=\"middle\" x=\"911.5\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 36 -->\n",
       "<g id=\"node32\" class=\"node\">\n",
       "<title>36</title>\n",
       "<text text-anchor=\"middle\" x=\"960.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">36 (.)</text>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;36 -->\n",
       "<g id=\"edge31\" class=\"edge\">\n",
       "<title>29&#45;&gt;36</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M942.95,-521.8C945.96,-510.16 950.01,-494.55 953.45,-481.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"956.94,-481.73 956.05,-471.18 950.16,-479.98 956.94,-481.73\"/>\n",
       "<text text-anchor=\"middle\" x=\"972\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 41 -->\n",
       "<g id=\"node33\" class=\"node\">\n",
       "<title>41</title>\n",
       "<text text-anchor=\"middle\" x=\"1090.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">41 (berbeza)</text>\n",
       "</g>\n",
       "<!-- 29&#45;&gt;41 -->\n",
       "<g id=\"edge32\" class=\"edge\">\n",
       "<title>29&#45;&gt;41</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M969.26,-521.8C992.82,-508.62 1025.51,-490.34 1051.01,-476.08\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1053.03,-478.97 1060.05,-471.03 1049.61,-472.86 1053.03,-478.97\"/>\n",
       "<text text-anchor=\"middle\" x=\"1038\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">dep</text>\n",
       "</g>\n",
       "<!-- 17 -->\n",
       "<g id=\"node19\" class=\"node\">\n",
       "<title>17</title>\n",
       "<text text-anchor=\"middle\" x=\"570.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">17 (Perdana)</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;17 -->\n",
       "<g id=\"edge18\" class=\"edge\">\n",
       "<title>16&#45;&gt;17</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M671,-434.8C651.79,-421.84 625.26,-403.94 604.28,-389.79\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"606.21,-386.87 595.96,-384.18 602.29,-392.67 606.21,-386.87\"/>\n",
       "<text text-anchor=\"middle\" x=\"653.5\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 19 -->\n",
       "<g id=\"node20\" class=\"node\">\n",
       "<title>19</title>\n",
       "<text text-anchor=\"middle\" x=\"669.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">19 (,)</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;19 -->\n",
       "<g id=\"edge19\" class=\"edge\">\n",
       "<title>16&#45;&gt;19</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M690.51,-434.95C688.55,-429.26 686.39,-422.87 684.5,-417 682.1,-409.53 679.6,-401.38 677.36,-393.88\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"680.68,-392.77 674.47,-384.18 673.96,-394.76 680.68,-392.77\"/>\n",
       "<text text-anchor=\"middle\" x=\"705\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 20 -->\n",
       "<g id=\"node21\" class=\"node\">\n",
       "<title>20</title>\n",
       "<text text-anchor=\"middle\" x=\"760.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">20 (Datuk)</text>\n",
       "</g>\n",
       "<!-- 16&#45;&gt;20 -->\n",
       "<g id=\"edge20\" class=\"edge\">\n",
       "<title>16&#45;&gt;20</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M711.24,-434.78C715.9,-429.19 721,-422.9 725.5,-417 731.38,-409.29 737.53,-400.69 743.01,-392.84\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"746.05,-394.59 748.85,-384.37 740.29,-390.61 746.05,-394.59\"/>\n",
       "<text text-anchor=\"middle\" x=\"758\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">appos</text>\n",
       "</g>\n",
       "<!-- 18 -->\n",
       "<g id=\"node22\" class=\"node\">\n",
       "<title>18</title>\n",
       "<text text-anchor=\"middle\" x=\"570.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">18 (Menteri)</text>\n",
       "</g>\n",
       "<!-- 17&#45;&gt;18 -->\n",
       "<g id=\"edge21\" class=\"edge\">\n",
       "<title>17&#45;&gt;18</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M570.5,-347.8C570.5,-336.16 570.5,-320.55 570.5,-307.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"574,-307.18 570.5,-297.18 567,-307.18 574,-307.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"582.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 21 -->\n",
       "<g id=\"node23\" class=\"node\">\n",
       "<title>21</title>\n",
       "<text text-anchor=\"middle\" x=\"714.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">21 (Seri)</text>\n",
       "</g>\n",
       "<!-- 20&#45;&gt;21 -->\n",
       "<g id=\"edge22\" class=\"edge\">\n",
       "<title>20&#45;&gt;21</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M751.19,-347.8C744.71,-335.82 735.94,-319.62 728.6,-306.06\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"731.63,-304.3 723.79,-297.18 725.48,-307.64 731.63,-304.3\"/>\n",
       "<text text-anchor=\"middle\" x=\"752.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 25 -->\n",
       "<g id=\"node24\" class=\"node\">\n",
       "<title>25</title>\n",
       "<text text-anchor=\"middle\" x=\"811.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">25 (Tun)</text>\n",
       "</g>\n",
       "<!-- 20&#45;&gt;25 -->\n",
       "<g id=\"edge23\" class=\"edge\">\n",
       "<title>20&#45;&gt;25</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M770.82,-347.8C778.01,-335.82 787.73,-319.62 795.87,-306.06\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"799.05,-307.55 801.19,-297.18 793.05,-303.95 799.05,-307.55\"/>\n",
       "<text text-anchor=\"middle\" x=\"804.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">conj</text>\n",
       "</g>\n",
       "<!-- 22 -->\n",
       "<g id=\"node25\" class=\"node\">\n",
       "<title>22</title>\n",
       "<text text-anchor=\"middle\" x=\"711.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">22 (Najib)</text>\n",
       "</g>\n",
       "<!-- 21&#45;&gt;22 -->\n",
       "<g id=\"edge24\" class=\"edge\">\n",
       "<title>21&#45;&gt;22</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M713.89,-260.8C713.48,-249.16 712.93,-233.55 712.46,-220.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"715.96,-220.05 712.11,-210.18 708.96,-220.29 715.96,-220.05\"/>\n",
       "<text text-anchor=\"middle\" x=\"725.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 24 -->\n",
       "<g id=\"node27\" class=\"node\">\n",
       "<title>24</title>\n",
       "<text text-anchor=\"middle\" x=\"811.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">24 (dan)</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;24 -->\n",
       "<g id=\"edge26\" class=\"edge\">\n",
       "<title>25&#45;&gt;24</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M811.5,-260.8C811.5,-249.16 811.5,-233.55 811.5,-220.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"815,-220.18 811.5,-210.18 808,-220.18 815,-220.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"819.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">cc</text>\n",
       "</g>\n",
       "<!-- 26 -->\n",
       "<g id=\"node28\" class=\"node\">\n",
       "<title>26</title>\n",
       "<text text-anchor=\"middle\" x=\"901.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">26 (Dr)</text>\n",
       "</g>\n",
       "<!-- 25&#45;&gt;26 -->\n",
       "<g id=\"edge27\" class=\"edge\">\n",
       "<title>25&#45;&gt;26</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M829.71,-260.8C843.01,-248.24 861.21,-231.05 875.96,-217.12\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"878.45,-219.59 883.31,-210.18 873.64,-214.5 878.45,-219.59\"/>\n",
       "<text text-anchor=\"middle\" x=\"874.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 23 -->\n",
       "<g id=\"node26\" class=\"node\">\n",
       "<title>23</title>\n",
       "<text text-anchor=\"middle\" x=\"711.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">23 (Razak)</text>\n",
       "</g>\n",
       "<!-- 22&#45;&gt;23 -->\n",
       "<g id=\"edge25\" class=\"edge\">\n",
       "<title>22&#45;&gt;23</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M711.5,-173.8C711.5,-162.16 711.5,-146.55 711.5,-133.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"715,-133.18 711.5,-123.18 708,-133.18 715,-133.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"723.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 27 -->\n",
       "<g id=\"node29\" class=\"node\">\n",
       "<title>27</title>\n",
       "<text text-anchor=\"middle\" x=\"901.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">27 (Mahathir)</text>\n",
       "</g>\n",
       "<!-- 26&#45;&gt;27 -->\n",
       "<g id=\"edge28\" class=\"edge\">\n",
       "<title>26&#45;&gt;27</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M901.5,-173.8C901.5,-162.16 901.5,-146.55 901.5,-133.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"905,-133.18 901.5,-123.18 898,-133.18 905,-133.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"913.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 28 -->\n",
       "<g id=\"node30\" class=\"node\">\n",
       "<title>28</title>\n",
       "<text text-anchor=\"middle\" x=\"901.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">28 (Mohamad)</text>\n",
       "</g>\n",
       "<!-- 27&#45;&gt;28 -->\n",
       "<g id=\"edge29\" class=\"edge\">\n",
       "<title>27&#45;&gt;28</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M901.5,-86.8C901.5,-75.16 901.5,-59.55 901.5,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"905,-46.18 901.5,-36.18 898,-46.18 905,-46.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"913.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 30 -->\n",
       "<g id=\"node34\" class=\"node\">\n",
       "<title>30</title>\n",
       "<text text-anchor=\"middle\" x=\"851.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">30 (&#39;)</text>\n",
       "</g>\n",
       "<!-- 31&#45;&gt;30 -->\n",
       "<g id=\"edge33\" class=\"edge\">\n",
       "<title>31&#45;&gt;30</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M851.5,-434.8C851.5,-423.16 851.5,-407.55 851.5,-394.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"855,-394.18 851.5,-384.18 848,-394.18 855,-394.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"872\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 37 -->\n",
       "<g id=\"node39\" class=\"node\">\n",
       "<title>37</title>\n",
       "<text text-anchor=\"middle\" x=\"947.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">37 (Namun)</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;37 -->\n",
       "<g id=\"edge39\" class=\"edge\">\n",
       "<title>41&#45;&gt;37</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1045.88,-434.91C1034.07,-429.73 1021.54,-423.64 1010.5,-417 997.91,-409.43 985.04,-399.64 974.23,-390.73\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"976.31,-387.91 966.41,-384.14 971.8,-393.26 976.31,-387.91\"/>\n",
       "<text text-anchor=\"middle\" x=\"1029\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">mark</text>\n",
       "</g>\n",
       "<!-- 38 -->\n",
       "<g id=\"node40\" class=\"node\">\n",
       "<title>38</title>\n",
       "<text text-anchor=\"middle\" x=\"1043.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">38 (,)</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;38 -->\n",
       "<g id=\"edge40\" class=\"edge\">\n",
       "<title>41&#45;&gt;38</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1071.19,-434.83C1066.15,-429.53 1061.12,-423.4 1057.5,-417 1053.49,-409.91 1050.57,-401.59 1048.46,-393.8\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1051.85,-392.93 1046.14,-384 1045.04,-394.54 1051.85,-392.93\"/>\n",
       "<text text-anchor=\"middle\" x=\"1078\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 39 -->\n",
       "<g id=\"node41\" class=\"node\">\n",
       "<title>39</title>\n",
       "<text text-anchor=\"middle\" x=\"1137.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">39 (situasi)</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;39 -->\n",
       "<g id=\"edge42\" class=\"edge\">\n",
       "<title>41&#45;&gt;39</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1100.01,-434.8C1106.64,-422.82 1115.59,-406.62 1123.09,-393.06\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1126.23,-394.62 1128,-384.18 1120.1,-391.23 1126.23,-394.62\"/>\n",
       "<text text-anchor=\"middle\" x=\"1155.5\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">nsubj:pass</text>\n",
       "</g>\n",
       "<!-- 53 -->\n",
       "<g id=\"node43\" class=\"node\">\n",
       "<title>53</title>\n",
       "<text text-anchor=\"middle\" x=\"1231.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">53 (.)</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;53 -->\n",
       "<g id=\"edge41\" class=\"edge\">\n",
       "<title>41&#45;&gt;53</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1144.15,-441.86C1162.33,-436.58 1181.96,-428.69 1197.5,-417 1205.97,-410.63 1213.04,-401.51 1218.51,-392.8\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1221.62,-394.41 1223.61,-384 1215.57,-390.9 1221.62,-394.41\"/>\n",
       "<text text-anchor=\"middle\" x=\"1232\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 43 -->\n",
       "<g id=\"node44\" class=\"node\">\n",
       "<title>43</title>\n",
       "<text text-anchor=\"middle\" x=\"1341.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">43 (melibatkan)</text>\n",
       "</g>\n",
       "<!-- 41&#45;&gt;43 -->\n",
       "<g id=\"edge43\" class=\"edge\">\n",
       "<title>41&#45;&gt;43</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1144.1,-445.21C1177.25,-439.92 1220.25,-431.05 1256.5,-417 1274.65,-409.97 1293.44,-399.32 1308.73,-389.65\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1310.8,-392.48 1317.29,-384.11 1306.99,-386.61 1310.8,-392.48\"/>\n",
       "<text text-anchor=\"middle\" x=\"1305.5\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">advcl</text>\n",
       "</g>\n",
       "<!-- 32 -->\n",
       "<g id=\"node35\" class=\"node\">\n",
       "<title>32</title>\n",
       "<text text-anchor=\"middle\" x=\"714.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">32 (yang)</text>\n",
       "</g>\n",
       "<!-- 33 -->\n",
       "<g id=\"node36\" class=\"node\">\n",
       "<title>33</title>\n",
       "<text text-anchor=\"middle\" x=\"777.5\" y=\"-797.3\" font-family=\"Times,serif\" font-size=\"14.00\">33 (sama&#39;)</text>\n",
       "</g>\n",
       "<!-- 33&#45;&gt;32 -->\n",
       "<g id=\"edge34\" class=\"edge\">\n",
       "<title>33&#45;&gt;32</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M748.6,-782.88C741.91,-777.82 735.35,-771.79 730.5,-765 725.71,-758.3 722.31,-750.09 719.91,-742.28\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"723.24,-741.18 717.31,-732.41 716.47,-742.97 723.24,-741.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"750.5\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">nsubj</text>\n",
       "</g>\n",
       "<!-- 35 -->\n",
       "<g id=\"node37\" class=\"node\">\n",
       "<title>35</title>\n",
       "<text text-anchor=\"middle\" x=\"828.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">35 (sekapal)</text>\n",
       "</g>\n",
       "<!-- 33&#45;&gt;35 -->\n",
       "<g id=\"edge35\" class=\"edge\">\n",
       "<title>33&#45;&gt;35</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M774.13,-782.82C773.01,-772.7 773.19,-759.96 778.5,-750 780.69,-745.89 783.6,-742.16 786.92,-738.8\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"789.46,-741.24 794.73,-732.04 784.88,-735.95 789.46,-741.24\"/>\n",
       "<text text-anchor=\"middle\" x=\"793.5\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">conj</text>\n",
       "</g>\n",
       "<!-- 35&#45;&gt;33 -->\n",
       "<g id=\"edge36\" class=\"edge\">\n",
       "<title>35&#45;&gt;33</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M823.21,-732.36C819.78,-742.31 814.78,-754.81 808.5,-765 806.4,-768.4 803.97,-771.79 801.4,-775.04\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"798.64,-772.88 794.86,-782.78 803.99,-777.4 798.64,-772.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"837\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 34 -->\n",
       "<g id=\"node38\" class=\"node\">\n",
       "<title>34</title>\n",
       "<text text-anchor=\"middle\" x=\"828.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">34 (atau)</text>\n",
       "</g>\n",
       "<!-- 35&#45;&gt;34 -->\n",
       "<g id=\"edge37\" class=\"edge\">\n",
       "<title>35&#45;&gt;34</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M828.5,-695.8C828.5,-684.16 828.5,-668.55 828.5,-655.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"832,-655.18 828.5,-645.18 825,-655.18 832,-655.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"836.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">cc</text>\n",
       "</g>\n",
       "<!-- 40 -->\n",
       "<g id=\"node42\" class=\"node\">\n",
       "<title>40</title>\n",
       "<text text-anchor=\"middle\" x=\"1137.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">40 (itu)</text>\n",
       "</g>\n",
       "<!-- 39&#45;&gt;40 -->\n",
       "<g id=\"edge38\" class=\"edge\">\n",
       "<title>39&#45;&gt;40</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1137.5,-347.8C1137.5,-336.16 1137.5,-320.55 1137.5,-307.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1141,-307.18 1137.5,-297.18 1134,-307.18 1141,-307.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1149.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">det</text>\n",
       "</g>\n",
       "<!-- 42 -->\n",
       "<g id=\"node45\" class=\"node\">\n",
       "<title>42</title>\n",
       "<text text-anchor=\"middle\" x=\"1297.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">42 (apabila)</text>\n",
       "</g>\n",
       "<!-- 43&#45;&gt;42 -->\n",
       "<g id=\"edge44\" class=\"edge\">\n",
       "<title>43&#45;&gt;42</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1330.65,-347.77C1327.27,-342.17 1323.61,-335.89 1320.5,-330 1316.55,-322.51 1312.58,-314.22 1309.07,-306.58\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1312.22,-305.03 1304.92,-297.35 1305.83,-307.91 1312.22,-305.03\"/>\n",
       "<text text-anchor=\"middle\" x=\"1339\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">mark</text>\n",
       "</g>\n",
       "<!-- 44 -->\n",
       "<g id=\"node46\" class=\"node\">\n",
       "<title>44</title>\n",
       "<text text-anchor=\"middle\" x=\"1401.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">44 (isu)</text>\n",
       "</g>\n",
       "<!-- 43&#45;&gt;44 -->\n",
       "<g id=\"edge45\" class=\"edge\">\n",
       "<title>43&#45;&gt;44</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1353.64,-347.8C1362.18,-335.7 1373.76,-319.3 1383.38,-305.67\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1386.47,-307.36 1389.38,-297.18 1380.75,-303.33 1386.47,-307.36\"/>\n",
       "<text text-anchor=\"middle\" x=\"1386.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 45 -->\n",
       "<g id=\"node47\" class=\"node\">\n",
       "<title>45</title>\n",
       "<text text-anchor=\"middle\" x=\"1333.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">45 (ketidakpatuhan)</text>\n",
       "</g>\n",
       "<!-- 44&#45;&gt;45 -->\n",
       "<g id=\"edge46\" class=\"edge\">\n",
       "<title>44&#45;&gt;45</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1381.35,-260.72C1375.6,-255.32 1369.53,-249.17 1364.5,-243 1358.5,-235.64 1352.76,-227.03 1347.9,-219.05\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1350.9,-217.24 1342.8,-210.4 1344.87,-220.79 1350.9,-217.24\"/>\n",
       "<text text-anchor=\"middle\" x=\"1401.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">compound</text>\n",
       "</g>\n",
       "<!-- 47 -->\n",
       "<g id=\"node48\" class=\"node\">\n",
       "<title>47</title>\n",
       "<text text-anchor=\"middle\" x=\"1489.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">47 (prosedur)</text>\n",
       "</g>\n",
       "<!-- 44&#45;&gt;47 -->\n",
       "<g id=\"edge47\" class=\"edge\">\n",
       "<title>44&#45;&gt;47</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1419.63,-260.97C1425.65,-255.28 1432.39,-248.89 1438.5,-243 1447.12,-234.7 1456.48,-225.56 1464.81,-217.38\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1467.43,-219.71 1472.11,-210.2 1462.52,-214.72 1467.43,-219.71\"/>\n",
       "<text text-anchor=\"middle\" x=\"1473.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">nmod</text>\n",
       "</g>\n",
       "<!-- 46 -->\n",
       "<g id=\"node49\" class=\"node\">\n",
       "<title>46</title>\n",
       "<text text-anchor=\"middle\" x=\"1363.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">46 (terhadap)</text>\n",
       "</g>\n",
       "<!-- 47&#45;&gt;46 -->\n",
       "<g id=\"edge48\" class=\"edge\">\n",
       "<title>47&#45;&gt;46</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1464,-173.8C1444.79,-160.84 1418.26,-142.94 1397.28,-128.79\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1399.21,-125.87 1388.96,-123.18 1395.29,-131.67 1399.21,-125.87\"/>\n",
       "<text text-anchor=\"middle\" x=\"1450.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 48 -->\n",
       "<g id=\"node50\" class=\"node\">\n",
       "<title>48</title>\n",
       "<text text-anchor=\"middle\" x=\"1489.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">48 (operasi)</text>\n",
       "</g>\n",
       "<!-- 47&#45;&gt;48 -->\n",
       "<g id=\"edge49\" class=\"edge\">\n",
       "<title>47&#45;&gt;48</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1489.5,-173.8C1489.5,-162.16 1489.5,-146.55 1489.5,-133.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1493,-133.18 1489.5,-123.18 1486,-133.18 1493,-133.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1526.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">compound</text>\n",
       "</g>\n",
       "<!-- 51 -->\n",
       "<g id=\"node51\" class=\"node\">\n",
       "<title>51</title>\n",
       "<text text-anchor=\"middle\" x=\"1598.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">51 (SOP)</text>\n",
       "</g>\n",
       "<!-- 47&#45;&gt;51 -->\n",
       "<g id=\"edge50\" class=\"edge\">\n",
       "<title>47&#45;&gt;51</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1539.59,-173.85C1549.5,-169.05 1559.35,-163.13 1567.5,-156 1575.06,-149.38 1581.39,-140.46 1586.32,-131.99\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1589.45,-133.57 1591.11,-123.1 1583.28,-130.25 1589.45,-133.57\"/>\n",
       "<text text-anchor=\"middle\" x=\"1602\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">appos</text>\n",
       "</g>\n",
       "<!-- 49 -->\n",
       "<g id=\"node52\" class=\"node\">\n",
       "<title>49</title>\n",
       "<text text-anchor=\"middle\" x=\"1489.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">49 (standard)</text>\n",
       "</g>\n",
       "<!-- 48&#45;&gt;49 -->\n",
       "<g id=\"edge51\" class=\"edge\">\n",
       "<title>48&#45;&gt;49</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1489.5,-86.8C1489.5,-75.16 1489.5,-59.55 1489.5,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1493,-46.18 1489.5,-36.18 1486,-46.18 1493,-46.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1501.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 50 -->\n",
       "<g id=\"node53\" class=\"node\">\n",
       "<title>50</title>\n",
       "<text text-anchor=\"middle\" x=\"1595.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">50 (()</text>\n",
       "</g>\n",
       "<!-- 51&#45;&gt;50 -->\n",
       "<g id=\"edge52\" class=\"edge\">\n",
       "<title>51&#45;&gt;50</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1597.89,-86.8C1597.48,-75.16 1596.93,-59.55 1596.46,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1599.96,-46.05 1596.11,-36.18 1592.96,-46.29 1599.96,-46.05\"/>\n",
       "<text text-anchor=\"middle\" x=\"1618\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 52 -->\n",
       "<g id=\"node54\" class=\"node\">\n",
       "<title>52</title>\n",
       "<text text-anchor=\"middle\" x=\"1668.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">52 ())</text>\n",
       "</g>\n",
       "<!-- 51&#45;&gt;52 -->\n",
       "<g id=\"edge53\" class=\"edge\">\n",
       "<title>51&#45;&gt;52</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1623.88,-86.77C1630.44,-81.55 1637.16,-75.48 1642.5,-69 1648.31,-61.94 1653.35,-53.38 1657.4,-45.34\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1660.57,-46.82 1661.68,-36.28 1654.24,-43.82 1660.57,-46.82\"/>\n",
       "<text text-anchor=\"middle\" x=\"1673\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 54 -->\n",
       "<g id=\"node55\" class=\"node\">\n",
       "<title>54</title>\n",
       "<text text-anchor=\"middle\" x=\"1297.5\" y=\"-797.3\" font-family=\"Times,serif\" font-size=\"14.00\">54 (Najib)</text>\n",
       "</g>\n",
       "<!-- 55 -->\n",
       "<g id=\"node56\" class=\"node\">\n",
       "<title>55</title>\n",
       "<text text-anchor=\"middle\" x=\"1141.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">55 (,)</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;55 -->\n",
       "<g id=\"edge54\" class=\"edge\">\n",
       "<title>54&#45;&gt;55</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1253.31,-789.22C1234.69,-783.59 1213.26,-775.61 1195.5,-765 1184.02,-758.14 1172.9,-748.53 1163.76,-739.56\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1166.09,-736.94 1156.59,-732.26 1161.1,-741.85 1166.09,-736.94\"/>\n",
       "<text text-anchor=\"middle\" x=\"1216\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 88 -->\n",
       "<g id=\"node57\" class=\"node\">\n",
       "<title>88</title>\n",
       "<text text-anchor=\"middle\" x=\"1213.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">88 (.)</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;88 -->\n",
       "<g id=\"edge55\" class=\"edge\">\n",
       "<title>54&#45;&gt;88</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1273.23,-782.88C1266.24,-777.49 1258.8,-771.29 1252.5,-765 1244.98,-757.49 1237.59,-748.54 1231.3,-740.3\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1233.96,-738.01 1225.18,-732.06 1228.34,-742.18 1233.96,-738.01\"/>\n",
       "<text text-anchor=\"middle\" x=\"1273\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">punct</text>\n",
       "</g>\n",
       "<!-- 58 -->\n",
       "<g id=\"node58\" class=\"node\">\n",
       "<title>58</title>\n",
       "<text text-anchor=\"middle\" x=\"1297.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">58 (Ahli)</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;58 -->\n",
       "<g id=\"edge56\" class=\"edge\">\n",
       "<title>54&#45;&gt;58</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1297.5,-782.8C1297.5,-771.16 1297.5,-755.55 1297.5,-742.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1301,-742.18 1297.5,-732.18 1294,-742.18 1301,-742.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1308\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">acl</text>\n",
       "</g>\n",
       "<!-- 61 -->\n",
       "<g id=\"node59\" class=\"node\">\n",
       "<title>61</title>\n",
       "<text text-anchor=\"middle\" x=\"1405.5\" y=\"-710.3\" font-family=\"Times,serif\" font-size=\"14.00\">61 (memuji)</text>\n",
       "</g>\n",
       "<!-- 54&#45;&gt;61 -->\n",
       "<g id=\"edge57\" class=\"edge\">\n",
       "<title>54&#45;&gt;61</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1317.51,-782.77C1329.05,-772.98 1343.92,-760.59 1357.5,-750 1362.52,-746.09 1367.9,-742.03 1373.19,-738.12\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1375.35,-740.88 1381.35,-732.15 1371.21,-735.23 1375.35,-740.88\"/>\n",
       "<text text-anchor=\"middle\" x=\"1368\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">acl</text>\n",
       "</g>\n",
       "<!-- 56 -->\n",
       "<g id=\"node60\" class=\"node\">\n",
       "<title>56</title>\n",
       "<text text-anchor=\"middle\" x=\"1188.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">56 (yang)</text>\n",
       "</g>\n",
       "<!-- 58&#45;&gt;56 -->\n",
       "<g id=\"edge58\" class=\"edge\">\n",
       "<title>58&#45;&gt;56</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1272.81,-695.91C1264.95,-690.32 1256.28,-684.01 1248.5,-678 1237.66,-669.63 1226.03,-660.08 1215.93,-651.59\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1218.09,-648.83 1208.2,-645.04 1213.57,-654.18 1218.09,-648.83\"/>\n",
       "<text text-anchor=\"middle\" x=\"1268.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">nsubj</text>\n",
       "</g>\n",
       "<!-- 57 -->\n",
       "<g id=\"node61\" class=\"node\">\n",
       "<title>57</title>\n",
       "<text text-anchor=\"middle\" x=\"1288.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">57 (juga)</text>\n",
       "</g>\n",
       "<!-- 58&#45;&gt;57 -->\n",
       "<g id=\"edge59\" class=\"edge\">\n",
       "<title>58&#45;&gt;57</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1295.68,-695.8C1294.45,-684.16 1292.79,-668.55 1291.38,-655.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1294.85,-654.75 1290.32,-645.18 1287.89,-655.49 1294.85,-654.75\"/>\n",
       "<text text-anchor=\"middle\" x=\"1323\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">advmod</text>\n",
       "</g>\n",
       "<!-- 59 -->\n",
       "<g id=\"node62\" class=\"node\">\n",
       "<title>59</title>\n",
       "<text text-anchor=\"middle\" x=\"1403.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">59 (Parlimen)</text>\n",
       "</g>\n",
       "<!-- 58&#45;&gt;59 -->\n",
       "<g id=\"edge60\" class=\"edge\">\n",
       "<title>58&#45;&gt;59</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1329.21,-695.91C1338.04,-690.62 1347.42,-684.46 1355.5,-678 1364.85,-670.52 1374.19,-661.3 1382.11,-652.82\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1384.8,-655.07 1388.94,-645.32 1379.62,-650.35 1384.8,-655.07\"/>\n",
       "<text text-anchor=\"middle\" x=\"1383.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 61&#45;&gt;54 -->\n",
       "<g id=\"edge62\" class=\"edge\">\n",
       "<title>61&#45;&gt;54</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1399.59,-732.16C1395.19,-742.79 1388.25,-756.07 1378.5,-765 1370.63,-772.22 1361.03,-778.1 1351.24,-782.84\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1349.54,-779.76 1341.84,-787.03 1352.4,-786.15 1349.54,-779.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"1410.5\" y=\"-753.8\" font-family=\"Times,serif\" font-size=\"14.00\">nsubj</text>\n",
       "</g>\n",
       "<!-- 62 -->\n",
       "<g id=\"node64\" class=\"node\">\n",
       "<title>62</title>\n",
       "<text text-anchor=\"middle\" x=\"1521.5\" y=\"-623.3\" font-family=\"Times,serif\" font-size=\"14.00\">62 (sikap)</text>\n",
       "</g>\n",
       "<!-- 61&#45;&gt;62 -->\n",
       "<g id=\"edge63\" class=\"edge\">\n",
       "<title>61&#45;&gt;62</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1428.97,-695.8C1446.51,-682.95 1470.65,-665.26 1489.88,-651.17\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1492.06,-653.91 1498.06,-645.18 1487.93,-648.26 1492.06,-653.91\"/>\n",
       "<text text-anchor=\"middle\" x=\"1481.5\" y=\"-666.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 60 -->\n",
       "<g id=\"node63\" class=\"node\">\n",
       "<title>60</title>\n",
       "<text text-anchor=\"middle\" x=\"1403.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">60 (Pekan)</text>\n",
       "</g>\n",
       "<!-- 59&#45;&gt;60 -->\n",
       "<g id=\"edge61\" class=\"edge\">\n",
       "<title>59&#45;&gt;60</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1403.5,-608.8C1403.5,-597.16 1403.5,-581.55 1403.5,-568.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1407,-568.18 1403.5,-558.18 1400,-568.18 1407,-568.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1415.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 63 -->\n",
       "<g id=\"node65\" class=\"node\">\n",
       "<title>63</title>\n",
       "<text text-anchor=\"middle\" x=\"1510.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">63 (Ahli)</text>\n",
       "</g>\n",
       "<!-- 62&#45;&gt;63 -->\n",
       "<g id=\"edge64\" class=\"edge\">\n",
       "<title>62&#45;&gt;63</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1519.27,-608.8C1517.77,-597.16 1515.75,-581.55 1514.02,-568.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1517.48,-567.64 1512.72,-558.18 1510.54,-568.54 1517.48,-567.64\"/>\n",
       "<text text-anchor=\"middle\" x=\"1529.5\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 68 -->\n",
       "<g id=\"node66\" class=\"node\">\n",
       "<title>68</title>\n",
       "<text text-anchor=\"middle\" x=\"1625.5\" y=\"-536.3\" font-family=\"Times,serif\" font-size=\"14.00\">68 (mengaku)</text>\n",
       "</g>\n",
       "<!-- 62&#45;&gt;68 -->\n",
       "<g id=\"edge65\" class=\"edge\">\n",
       "<title>62&#45;&gt;68</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1542.55,-608.8C1558.05,-596.13 1579.33,-578.73 1596.46,-564.74\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1598.96,-567.21 1604.49,-558.18 1594.53,-561.79 1598.96,-567.21\"/>\n",
       "<text text-anchor=\"middle\" x=\"1591\" y=\"-579.8\" font-family=\"Times,serif\" font-size=\"14.00\">acl</text>\n",
       "</g>\n",
       "<!-- 64 -->\n",
       "<g id=\"node67\" class=\"node\">\n",
       "<title>64</title>\n",
       "<text text-anchor=\"middle\" x=\"1508.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">64 (Parlimen)</text>\n",
       "</g>\n",
       "<!-- 63&#45;&gt;64 -->\n",
       "<g id=\"edge66\" class=\"edge\">\n",
       "<title>63&#45;&gt;64</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1510.1,-521.8C1509.82,-510.16 1509.45,-494.55 1509.14,-481.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1512.64,-481.09 1508.9,-471.18 1505.64,-481.26 1512.64,-481.09\"/>\n",
       "<text text-anchor=\"middle\" x=\"1522.5\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 67 -->\n",
       "<g id=\"node70\" class=\"node\">\n",
       "<title>67</title>\n",
       "<text text-anchor=\"middle\" x=\"1625.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">67 (yang)</text>\n",
       "</g>\n",
       "<!-- 68&#45;&gt;67 -->\n",
       "<g id=\"edge69\" class=\"edge\">\n",
       "<title>68&#45;&gt;67</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1625.5,-521.8C1625.5,-510.16 1625.5,-494.55 1625.5,-481.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1629,-481.18 1625.5,-471.18 1622,-481.18 1629,-481.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1645.5\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">nsubj</text>\n",
       "</g>\n",
       "<!-- 69 -->\n",
       "<g id=\"node71\" class=\"node\">\n",
       "<title>69</title>\n",
       "<text text-anchor=\"middle\" x=\"1740.5\" y=\"-449.3\" font-family=\"Times,serif\" font-size=\"14.00\">69 (bersalah)</text>\n",
       "</g>\n",
       "<!-- 68&#45;&gt;69 -->\n",
       "<g id=\"edge70\" class=\"edge\">\n",
       "<title>68&#45;&gt;69</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1648.77,-521.8C1666.15,-508.95 1690.09,-491.26 1709.16,-477.17\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1711.3,-479.93 1717.26,-471.18 1707.14,-474.3 1711.3,-479.93\"/>\n",
       "<text text-anchor=\"middle\" x=\"1714\" y=\"-492.8\" font-family=\"Times,serif\" font-size=\"14.00\">xcomp</text>\n",
       "</g>\n",
       "<!-- 65 -->\n",
       "<g id=\"node68\" class=\"node\">\n",
       "<title>65</title>\n",
       "<text text-anchor=\"middle\" x=\"1508.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">65 (Langkawi)</text>\n",
       "</g>\n",
       "<!-- 64&#45;&gt;65 -->\n",
       "<g id=\"edge67\" class=\"edge\">\n",
       "<title>64&#45;&gt;65</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1508.5,-434.8C1508.5,-423.16 1508.5,-407.55 1508.5,-394.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1512,-394.18 1508.5,-384.18 1505,-394.18 1512,-394.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1520.5\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">flat</text>\n",
       "</g>\n",
       "<!-- 66 -->\n",
       "<g id=\"node69\" class=\"node\">\n",
       "<title>66</title>\n",
       "<text text-anchor=\"middle\" x=\"1508.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">66 (itu)</text>\n",
       "</g>\n",
       "<!-- 65&#45;&gt;66 -->\n",
       "<g id=\"edge68\" class=\"edge\">\n",
       "<title>65&#45;&gt;66</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1508.5,-347.8C1508.5,-336.16 1508.5,-320.55 1508.5,-307.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1512,-307.18 1508.5,-297.18 1505,-307.18 1512,-307.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1520.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">det</text>\n",
       "</g>\n",
       "<!-- 71 -->\n",
       "<g id=\"node72\" class=\"node\">\n",
       "<title>71</title>\n",
       "<text text-anchor=\"middle\" x=\"1740.5\" y=\"-362.3\" font-family=\"Times,serif\" font-size=\"14.00\">71 (melanggar)</text>\n",
       "</g>\n",
       "<!-- 69&#45;&gt;71 -->\n",
       "<g id=\"edge71\" class=\"edge\">\n",
       "<title>69&#45;&gt;71</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1740.5,-434.8C1740.5,-423.16 1740.5,-407.55 1740.5,-394.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1744,-394.18 1740.5,-384.18 1737,-394.18 1744,-394.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1764\" y=\"-405.8\" font-family=\"Times,serif\" font-size=\"14.00\">xcomp</text>\n",
       "</g>\n",
       "<!-- 70 -->\n",
       "<g id=\"node73\" class=\"node\">\n",
       "<title>70</title>\n",
       "<text text-anchor=\"middle\" x=\"1630.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">70 (selepas)</text>\n",
       "</g>\n",
       "<!-- 71&#45;&gt;70 -->\n",
       "<g id=\"edge72\" class=\"edge\">\n",
       "<title>71&#45;&gt;70</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1718.24,-347.8C1701.69,-335.01 1678.92,-317.42 1660.73,-303.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1662.78,-300.52 1652.73,-297.18 1658.5,-306.06 1662.78,-300.52\"/>\n",
       "<text text-anchor=\"middle\" x=\"1704.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">det</text>\n",
       "</g>\n",
       "<!-- 72 -->\n",
       "<g id=\"node74\" class=\"node\">\n",
       "<title>72</title>\n",
       "<text text-anchor=\"middle\" x=\"1740.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">72 (SOP)</text>\n",
       "</g>\n",
       "<!-- 71&#45;&gt;72 -->\n",
       "<g id=\"edge73\" class=\"edge\">\n",
       "<title>71&#45;&gt;72</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1740.5,-347.8C1740.5,-336.16 1740.5,-320.55 1740.5,-307.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1744,-307.18 1740.5,-297.18 1737,-307.18 1744,-307.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"1751.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 75 -->\n",
       "<g id=\"node75\" class=\"node\">\n",
       "<title>75</title>\n",
       "<text text-anchor=\"middle\" x=\"1863.5\" y=\"-275.3\" font-family=\"Times,serif\" font-size=\"14.00\">75 (mengambil)</text>\n",
       "</g>\n",
       "<!-- 71&#45;&gt;75 -->\n",
       "<g id=\"edge74\" class=\"edge\">\n",
       "<title>71&#45;&gt;75</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1765.39,-347.8C1784.06,-334.9 1809.81,-317.1 1830.25,-302.98\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1832.41,-305.74 1838.65,-297.18 1828.43,-299.98 1832.41,-305.74\"/>\n",
       "<text text-anchor=\"middle\" x=\"1828.5\" y=\"-318.8\" font-family=\"Times,serif\" font-size=\"14.00\">advcl</text>\n",
       "</g>\n",
       "<!-- 73 -->\n",
       "<g id=\"node76\" class=\"node\">\n",
       "<title>73</title>\n",
       "<text text-anchor=\"middle\" x=\"1671.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">73 (kerana)</text>\n",
       "</g>\n",
       "<!-- 75&#45;&gt;73 -->\n",
       "<g id=\"edge75\" class=\"edge\">\n",
       "<title>75&#45;&gt;73</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1807.18,-260.95C1791.82,-255.74 1775.33,-249.62 1760.5,-243 1742.64,-235.03 1723.64,-224.64 1707.81,-215.4\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1709.27,-212.2 1698.88,-210.12 1705.7,-218.22 1709.27,-212.2\"/>\n",
       "<text text-anchor=\"middle\" x=\"1779\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">mark</text>\n",
       "</g>\n",
       "<!-- 74 -->\n",
       "<g id=\"node77\" class=\"node\">\n",
       "<title>74</title>\n",
       "<text text-anchor=\"middle\" x=\"1781.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">74 (tidak)</text>\n",
       "</g>\n",
       "<!-- 75&#45;&gt;74 -->\n",
       "<g id=\"edge76\" class=\"edge\">\n",
       "<title>75&#45;&gt;74</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1834.07,-260.85C1826.54,-255.68 1818.8,-249.6 1812.5,-243 1805.84,-236.02 1799.87,-227.39 1795,-219.27\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1797.96,-217.4 1789.97,-210.43 1791.87,-220.86 1797.96,-217.4\"/>\n",
       "<text text-anchor=\"middle\" x=\"1841\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">advmod</text>\n",
       "</g>\n",
       "<!-- 76 -->\n",
       "<g id=\"node78\" class=\"node\">\n",
       "<title>76</title>\n",
       "<text text-anchor=\"middle\" x=\"1884.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">76 (suhu)</text>\n",
       "</g>\n",
       "<!-- 75&#45;&gt;76 -->\n",
       "<g id=\"edge77\" class=\"edge\">\n",
       "<title>75&#45;&gt;76</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1867.75,-260.8C1870.62,-249.16 1874.48,-233.55 1877.77,-220.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1881.26,-220.72 1880.26,-210.18 1874.46,-219.04 1881.26,-220.72\"/>\n",
       "<text text-anchor=\"middle\" x=\"1886.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">obj</text>\n",
       "</g>\n",
       "<!-- 79 -->\n",
       "<g id=\"node79\" class=\"node\">\n",
       "<title>79</title>\n",
       "<text text-anchor=\"middle\" x=\"2048.5\" y=\"-188.3\" font-family=\"Times,serif\" font-size=\"14.00\">79 (masuk)</text>\n",
       "</g>\n",
       "<!-- 75&#45;&gt;79 -->\n",
       "<g id=\"edge78\" class=\"edge\">\n",
       "<title>75&#45;&gt;79</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1900.94,-260.8C1930.12,-247.39 1970.8,-228.7 2002.06,-214.34\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2003.81,-217.39 2011.43,-210.03 2000.89,-211.02 2003.81,-217.39\"/>\n",
       "<text text-anchor=\"middle\" x=\"1986.5\" y=\"-231.8\" font-family=\"Times,serif\" font-size=\"14.00\">advcl</text>\n",
       "</g>\n",
       "<!-- 77 -->\n",
       "<g id=\"node80\" class=\"node\">\n",
       "<title>77</title>\n",
       "<text text-anchor=\"middle\" x=\"1827.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">77 (badan)</text>\n",
       "</g>\n",
       "<!-- 76&#45;&gt;77 -->\n",
       "<g id=\"edge79\" class=\"edge\">\n",
       "<title>76&#45;&gt;77</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M1859.05,-173.84C1852.93,-168.71 1846.89,-162.65 1842.5,-156 1837.98,-149.16 1834.79,-140.92 1832.54,-133.12\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1835.9,-132.14 1830.11,-123.27 1829.11,-133.82 1835.9,-132.14\"/>\n",
       "<text text-anchor=\"middle\" x=\"1879.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">compound</text>\n",
       "</g>\n",
       "<!-- 78 -->\n",
       "<g id=\"node81\" class=\"node\">\n",
       "<title>78</title>\n",
       "<text text-anchor=\"middle\" x=\"1938.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">78 (ketika)</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;78 -->\n",
       "<g id=\"edge80\" class=\"edge\">\n",
       "<title>79&#45;&gt;78</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2026.24,-173.8C2009.69,-161.01 1986.92,-143.42 1968.73,-129.36\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1970.78,-126.52 1960.73,-123.18 1966.5,-132.06 1970.78,-126.52\"/>\n",
       "<text text-anchor=\"middle\" x=\"2018\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">mark</text>\n",
       "</g>\n",
       "<!-- 82 -->\n",
       "<g id=\"node82\" class=\"node\">\n",
       "<title>82</title>\n",
       "<text text-anchor=\"middle\" x=\"2048.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">82 (surau)</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;82 -->\n",
       "<g id=\"edge81\" class=\"edge\">\n",
       "<title>79&#45;&gt;82</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2048.5,-173.8C2048.5,-162.16 2048.5,-146.55 2048.5,-133.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2052,-133.18 2048.5,-123.18 2045,-133.18 2052,-133.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"2059.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">obl</text>\n",
       "</g>\n",
       "<!-- 84 -->\n",
       "<g id=\"node83\" class=\"node\">\n",
       "<title>84</title>\n",
       "<text text-anchor=\"middle\" x=\"2170.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">84 (Langkawi)</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;84 -->\n",
       "<g id=\"edge82\" class=\"edge\">\n",
       "<title>79&#45;&gt;84</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2073.19,-173.8C2091.71,-160.9 2117.25,-143.1 2137.52,-128.98\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2139.64,-131.76 2145.85,-123.18 2135.64,-126.02 2139.64,-131.76\"/>\n",
       "<text text-anchor=\"middle\" x=\"2127.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">obl</text>\n",
       "</g>\n",
       "<!-- 86 -->\n",
       "<g id=\"node84\" class=\"node\">\n",
       "<title>86</title>\n",
       "<text text-anchor=\"middle\" x=\"2293.5\" y=\"-101.3\" font-family=\"Times,serif\" font-size=\"14.00\">86 (Sabtu)</text>\n",
       "</g>\n",
       "<!-- 79&#45;&gt;86 -->\n",
       "<g id=\"edge83\" class=\"edge\">\n",
       "<title>79&#45;&gt;86</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2096.61,-174.31C2137.08,-160.27 2194.97,-140.18 2237.51,-125.42\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2238.86,-128.66 2247.16,-122.08 2236.56,-122.05 2238.86,-128.66\"/>\n",
       "<text text-anchor=\"middle\" x=\"2196.5\" y=\"-144.8\" font-family=\"Times,serif\" font-size=\"14.00\">obl</text>\n",
       "</g>\n",
       "<!-- 80 -->\n",
       "<g id=\"node85\" class=\"node\">\n",
       "<title>80</title>\n",
       "<text text-anchor=\"middle\" x=\"1957.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">80 (ke)</text>\n",
       "</g>\n",
       "<!-- 82&#45;&gt;80 -->\n",
       "<g id=\"edge84\" class=\"edge\">\n",
       "<title>82&#45;&gt;80</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2030.08,-86.8C2016.64,-74.24 1998.24,-57.05 1983.32,-43.12\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"1985.58,-40.44 1975.89,-36.18 1980.81,-45.56 1985.58,-40.44\"/>\n",
       "<text text-anchor=\"middle\" x=\"2023.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 81 -->\n",
       "<g id=\"node86\" class=\"node\">\n",
       "<title>81</title>\n",
       "<text text-anchor=\"middle\" x=\"2059.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">81 (sebuah)</text>\n",
       "</g>\n",
       "<!-- 82&#45;&gt;81 -->\n",
       "<g id=\"edge85\" class=\"edge\">\n",
       "<title>82&#45;&gt;81</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2050.73,-86.8C2052.23,-75.16 2054.25,-59.55 2055.98,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2059.46,-46.54 2057.28,-36.18 2052.52,-45.64 2059.46,-46.54\"/>\n",
       "<text text-anchor=\"middle\" x=\"2066.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">det</text>\n",
       "</g>\n",
       "<!-- 83 -->\n",
       "<g id=\"node87\" class=\"node\">\n",
       "<title>83</title>\n",
       "<text text-anchor=\"middle\" x=\"2170.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">83 (di)</text>\n",
       "</g>\n",
       "<!-- 84&#45;&gt;83 -->\n",
       "<g id=\"edge86\" class=\"edge\">\n",
       "<title>84&#45;&gt;83</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2170.5,-86.8C2170.5,-75.16 2170.5,-59.55 2170.5,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2174,-46.18 2170.5,-36.18 2167,-46.18 2174,-46.18\"/>\n",
       "<text text-anchor=\"middle\" x=\"2186.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 85 -->\n",
       "<g id=\"node88\" class=\"node\">\n",
       "<title>85</title>\n",
       "<text text-anchor=\"middle\" x=\"2277.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">85 (pada)</text>\n",
       "</g>\n",
       "<!-- 86&#45;&gt;85 -->\n",
       "<g id=\"edge87\" class=\"edge\">\n",
       "<title>86&#45;&gt;85</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2290.26,-86.8C2288.07,-75.16 2285.13,-59.55 2282.63,-46.24\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2286.02,-45.36 2280.73,-36.18 2279.14,-46.65 2286.02,-45.36\"/>\n",
       "<text text-anchor=\"middle\" x=\"2301.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">case</text>\n",
       "</g>\n",
       "<!-- 87 -->\n",
       "<g id=\"node89\" class=\"node\">\n",
       "<title>87</title>\n",
       "<text text-anchor=\"middle\" x=\"2375.5\" y=\"-14.3\" font-family=\"Times,serif\" font-size=\"14.00\">87 (lalu)</text>\n",
       "</g>\n",
       "<!-- 86&#45;&gt;87 -->\n",
       "<g id=\"edge88\" class=\"edge\">\n",
       "<title>86&#45;&gt;87</title>\n",
       "<path fill=\"none\" stroke=\"black\" d=\"M2310.09,-86.8C2322.1,-74.36 2338.49,-57.36 2351.86,-43.5\"/>\n",
       "<polygon fill=\"black\" stroke=\"black\" points=\"2354.51,-45.8 2358.93,-36.18 2349.47,-40.94 2354.51,-45.8\"/>\n",
       "<text text-anchor=\"middle\" x=\"2358.5\" y=\"-57.8\" font-family=\"Times,serif\" font-size=\"14.00\">amod</text>\n",
       "</g>\n",
       "</g>\n",
       "</svg>\n"
      ],
      "text/plain": [
       "<graphviz.files.Source at 0x7f5da44880a0>"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "d.to_graphvis()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "CommitInfo(commit_url='https://huggingface.co/mesolitica/finetune-dependency-t5-small-standard-bahasa-cased/commit/440dd11f6d7534a777d3957211efced111a09bd7', commit_message='Upload T5Diaparser', commit_description='', oid='440dd11f6d7534a777d3957211efced111a09bd7', pr_url=None, pr_revision=None, pr_num=None)"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "model.push_to_hub('finetune-dependency-t5-small-standard-bahasa-cased', organization='mesolitica')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "CommitInfo(commit_url='https://huggingface.co/mesolitica/finetune-dependency-t5-small-standard-bahasa-cased/commit/d55eeb7dc4b205d4e7635619da418990fd33b2b3', commit_message='Upload tokenizer', commit_description='', oid='d55eeb7dc4b205d4e7635619da418990fd33b2b3', pr_url=None, pr_revision=None, pr_num=None)"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tokenizer.push_to_hub('finetune-dependency-t5-small-standard-bahasa-cased', organization='mesolitica')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "# !wget https://raw.githubusercontent.com/huseinzol05/malay-dataset/master/parsing/dependency/gsd-ud-test.conllu.txt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "groups, temp = [], []\n",
    "with open('gsd-ud-test.conllu.txt') as fopen:\n",
    "    for l in fopen:\n",
    "        l = l.strip()\n",
    "        if not len(l):\n",
    "            groups.append(temp[2:])\n",
    "            temp = []\n",
    "        else:\n",
    "            temp.append(l)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "from unidecode import unidecode\n",
    "\n",
    "def get_train(group):\n",
    "    texts, arcs, tags, indices = [], [], [], []\n",
    "    for g in group:\n",
    "        splitted = g.split('\\t')\n",
    "        texts.append(unidecode(splitted[1]).strip())\n",
    "        arcs.append(int(splitted[6]))\n",
    "        tags.append(tag2idx[splitted[7]])\n",
    "        indices.append(int(splitted[0]))\n",
    "        \n",
    "    return texts, arcs, tags, indices"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "def evaluate(heads_pred, types_pred, heads, types, lengths,\n",
    "             symbolic_root=False, symbolic_end=False):\n",
    "    batch_size, _ = heads_pred.shape\n",
    "    ucorr = 0.\n",
    "    lcorr = 0.\n",
    "    total = 0.\n",
    "    ucomplete_match = 0.\n",
    "    lcomplete_match = 0.\n",
    "\n",
    "    corr_root = 0.\n",
    "    total_root = 0.\n",
    "    start = 1 if symbolic_root else 0\n",
    "    end = 1 if symbolic_end else 0\n",
    "    for i in range(batch_size):\n",
    "        ucm = 1.\n",
    "        lcm = 1.\n",
    "        for j in range(start, lengths[i] - end):\n",
    "\n",
    "            total += 1\n",
    "            if heads[i, j] == heads_pred[i, j]:\n",
    "                ucorr += 1\n",
    "                if types[i, j] == types_pred[i, j]:\n",
    "                    lcorr += 1\n",
    "                else:\n",
    "                    lcm = 0\n",
    "            else:\n",
    "                ucm = 0\n",
    "                lcm = 0\n",
    "\n",
    "            if heads[i, j] == 0:\n",
    "                total_root += 1\n",
    "                corr_root += 1 if heads_pred[i, j] == 0 else 0\n",
    "\n",
    "        ucomplete_match += ucm\n",
    "        lcomplete_match += lcm\n",
    "    \n",
    "    return ucorr / total, lcorr / total, corr_root / total_root"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.9152542372881356, 0.8135593220338984, 1.0)"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x = get_train(groups[0])\n",
    "\n",
    "texts, indices = [1], [0]\n",
    "for i in range(len(x[0])):\n",
    "    t = tokenizer.encode(x[0][i], add_special_tokens=False)\n",
    "    texts.extend(t)\n",
    "    indices.extend([i + 1] * len(t))\n",
    "    \n",
    "model_inputs = {\n",
    "    'input_ids': texts,\n",
    "    'attention_mask': [1] * len(texts),\n",
    "    'indices': indices\n",
    "}\n",
    "padded = tokenizer.pad(\n",
    "    [model_inputs],\n",
    "    padding=True,\n",
    "    max_length=None,\n",
    "    pad_to_multiple_of=None,\n",
    "    return_tensors='pt',\n",
    ")\n",
    "\n",
    "o = model(**padded)\n",
    "arc_preds = o.s_arc.argmax(axis = -1)\n",
    "rel_preds = o.s_rel.argmax(-1)\n",
    "rel_preds = rel_preds.gather(-1, arc_preds.unsqueeze(-1)).squeeze(-1)\n",
    "seq = padded['input_ids'][0,1:]\n",
    "seq = tokenizer.convert_ids_to_tokens(seq)\n",
    "tagging = rel_preds[0,1:].detach().numpy()\n",
    "depend = arc_preds[0,1:].detach().numpy()\n",
    "tagging = merge_sentencepiece_tokens_tagging(seq, tagging, rejected = tokenizer.all_special_tokens)[1]\n",
    "indexing = merge_sentencepiece_tokens_tagging(seq, depend, rejected = tokenizer.all_special_tokens)[1]\n",
    "\n",
    "arc_accuracy, type_accuracy, root_accuracy = evaluate(np.expand_dims(np.array(indexing), 0), \n",
    "        np.expand_dims(np.array(tagging), 0),\n",
    "        np.expand_dims(np.array(x[1]), 0),\n",
    "        np.expand_dims(np.array(x[2]), 0),\n",
    "        [len(tagging)])\n",
    "\n",
    "arc_accuracy, type_accuracy, root_accuracy"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      " 61%|█████████████████████████                | 341/557 [00:08<00:05, 42.69it/s]"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "index 48 is out of bounds for axis 1 with size 48\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "100%|█████████████████████████████████████████| 557/557 [00:14<00:00, 39.28it/s]\n"
     ]
    }
   ],
   "source": [
    "from tqdm import tqdm\n",
    "\n",
    "arcs, types, roots = [], [], []\n",
    "\n",
    "for n in tqdm(range(len(groups))):\n",
    "    x = get_train(groups[n])\n",
    "\n",
    "    texts, indices = [1], [0]\n",
    "    for i in range(len(x[0])):\n",
    "        t = tokenizer.encode(x[0][i], add_special_tokens=False)\n",
    "        texts.extend(t)\n",
    "        indices.extend([i + 1] * len(t))\n",
    "\n",
    "    model_inputs = {\n",
    "        'input_ids': texts,\n",
    "        'attention_mask': [1] * len(texts),\n",
    "        'indices': indices\n",
    "    }\n",
    "    padded = tokenizer.pad(\n",
    "        [model_inputs],\n",
    "        padding=True,\n",
    "        max_length=None,\n",
    "        pad_to_multiple_of=None,\n",
    "        return_tensors='pt',\n",
    "    )\n",
    "\n",
    "    o = model(**padded)\n",
    "    arc_preds = o.s_arc.argmax(axis = -1)\n",
    "    rel_preds = o.s_rel.argmax(-1)\n",
    "    rel_preds = rel_preds.gather(-1, arc_preds.unsqueeze(-1)).squeeze(-1)\n",
    "    seq = padded['input_ids'][0,1:]\n",
    "    seq = tokenizer.convert_ids_to_tokens(seq)\n",
    "    tagging = rel_preds[0,1:].detach().numpy()\n",
    "    depend = arc_preds[0,1:].detach().numpy()\n",
    "    tagging = merge_sentencepiece_tokens_tagging(seq, tagging, rejected = tokenizer.all_special_tokens)\n",
    "    s_tagging = tagging[0]\n",
    "    tagging = tagging[1]\n",
    "    indexing = merge_sentencepiece_tokens_tagging(seq, depend, rejected = tokenizer.all_special_tokens)[1]\n",
    "    \n",
    "    try:\n",
    "        arc_accuracy, type_accuracy, root_accuracy = evaluate(np.expand_dims(np.array(indexing), 0), \n",
    "                np.expand_dims(np.array(tagging), 0),\n",
    "                np.expand_dims(np.array(x[1]), 0),\n",
    "                np.expand_dims(np.array(x[2]), 0),\n",
    "                [len(tagging)])\n",
    "\n",
    "        arcs.append(arc_accuracy)\n",
    "        types.append(type_accuracy)\n",
    "        roots.append(root_accuracy)\n",
    "    except Exception as e:\n",
    "        print(e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0.8494045261191319, 0.783103051811978, 0.8669064748201439)"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "np.mean(arcs), np.mean(types), np.mean(roots)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
